package day04_Array;

public class Test02百度答案 {
    public static void main(String[] args) {
        Test02百度答案 z = new Test02百度答案();
		z.second(100);
}
    public void second(int n) {
        int a[] = new int[50];
        for (int i = 0; i < 50; i++) {
            a[i] = (int) (Math.random() * n);
        }
        int max = a[0], min = a[0];
        int sum = 0;
        for(int j:a){
            if(max<j){
                max = j;
            }
            if(min>j){
                min=j;
            }
            if(j>=60){
                sum++;
            }
        }
        System.out.println("最大值是："+max);
        System.out.println("最小值是："+min);
        System.out.println("大于60的数量："+sum);

    }
}
